The present disclosure relates to a power management scheme for a processor operating in a virtual environment, and more particularly to power management for a graphics, multimedia or other special function processor being used by a plurality of different virtual machines.
Virtualization relates to the creation and management of separate software environments or “virtual machines” (VMs) operating on a physical machine, or host system. The host system is logically partitioned so that the underlying hardware of the physical machine is time shared and appears to be independently operating VMs. The software running in a VM (such as an operating system or an application) is collectively referred to as guest software. Therefore, each VM functions as a self-contained platform, running its own guest operating system (OS) and guest application software.
A hypervisor or virtual machine manager (VMM) is a software program that allows multiple VMs to share a single hardware host system. The hypervisor schedules and manages the allocation of the host hardware resources to the different VMs. The guest operating system of each VM appears to have the host's processor, memory, and other resources all to itself. The hypervisor controls the host's processor and other resources, allocating what is needed to each VM. Hypervisors typically rely on time-slicing between various VMs according to round-robin or priority-based schemes, for example, to allocate resources to the various VMs. Time slices allocated to each VM may be stored in a memory so that the hypervisor periodically switches between the VMs based on the allocated time slices.
The use of a processing core by multiple VMs is well known. For instance, one VM may be operating Microsoft Windows® and another VM may be operating Linux. Input output (I/O) devices are typically assigned to one VM at a time. A hypervisor running on the processing core manages allocation of the physical machines such as central processing core and a graphics processing core to the various VMs. In conventional virtualization systems, the hypervisor allocates the graphics processing core as a physical resource to one of the VMs at a time as discussed above. This conventional system may include multiple graphics processing cores in a one-to-one relationship with the VMs. In other prior art virtualization examples, one VM controls the graphics processing core while other VMs emulate rendering functions in software. An end user can switch ownership of the graphics processing core between the multiple VMs.
In another embodiment, the hypervisor may show the user a window inside another window on a display for managing ownership of the graphics processing core. The graphics processing core typically flushes out content for one VM and composites or integrates it within the content of the next VM. This time multiplexing of the physical machine is done on a coarse basis. In other words, the graphics processing core is assigned to the VM for a long time interval sufficient to permit a graphics processing task used by the virtual machine to be completed. This approach typically requires significant hypervisor oversight to manage allocation of the graphics processing core.
In a non-virtual environment, a graphics driver defines the operating range settings of the graphics processing core frequencies and voltages based on factors such as display bandwidth, decoding, encoding and other requirements for current display configurations and active applications. These operating range settings are then programmed into hardware memory for use by a power management unit (PMU) of the graphics processing core.
In a virtual environment, each VM typically includes its own graphics driver that requests power management operating range settings of the graphics processing core including operating frequencies and voltages for various engines of the graphics processing core based on the operating conditions of the associated VM. However, different VMs often run different application mixes that require different graphics processing core power management operating ranges.
Current methods under utilize graphics processing core performance when such graphics processing cores could handle graphic rendering requirements for multiple VMs. In addition, VMs may rely on or benefit from graphics processing core functionality for parallel computing independent of graphics rendering functions. Accordingly, it is desired to provide a finer grain approach to multiplexing of a graphics processing core between a plurality of VMs.
Therefore, there exists a need to determine appropriate graphics processing core power settings to satisfy the requirements of the multiple VMs while reducing and/or managing power consumption of the graphics processing core.